<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../../common/taglibs.jsp"%>
<%@include file="../../common/_head.jsp"%>
<html>
<head>
    <title>通话明细列表</title>
    <style>
        a:link{
            color: #009688;
        }
        a:visited{
            color: red;
        }
    </style>
</head>
<body pname="<%=basePath%>">
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <table class="layui-hide" id="data-table" lay-filter="data-table"></table>

                    <script type="text/html" id="data-table-toolbar">
                        <div class="layui">
                            <div class="layui-condition" <c:if test="${not empty param.fromUserId}">style="display: none !important;" </c:if>>
                                <label>主叫方id：</label>
                                <div class="layui-inline" style="width: 110px;">
                                    <input type="text" id="fromUserId" placeholder="请输入主叫方id" autocomplete="off" class="layui-input" value="${param.fromUserId}">
                                </div>
                            </div>
                            <div class="layui-condition">
                                <label>被叫方id：</label>
                                <div class="layui-inline" style="width: 110px;">
                                    <input type="text" id="toUserId" placeholder="请输入被叫方id" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-condition">
                                <label>通话时长：</label>
                                <div class="layui-inline" style="width: 150px;">
                                    <input type="number" class="layui-input" style="width:42%; float: left" autoComplete="off" id="callTimeMin" min="0" placeholder="最小值"/>
                                    -<input type="number" class="layui-input" style="width:42%; float: right" autoComplete="off" id="callTimeMax" min="0" placeholder="最大值"/>
                                </div>
                            </div>
                            <div class="layui-condition">
                                <label>评价：</label>
                                <div class="layui-inline" style="width: 90px;">
                                    <select id="type">
                                        <option value="">全部</option>
                                        <option value="0">好评</option>
                                        <option value="1">差评</option>
                                        <option value="-1">未评价</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-condition">
                                <label>状态：</label>
                                <div class="layui-inline" style="width: 90px;">
                                    <select id="vstatus">
                                        <option value="">全部</option>
                                        <option value="0">未删除</option>
                                        <option value="1">已删除</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-condition">
                                <label>时间：</label>
                                <div class="layui-inline" style="width: 180px;">
                                    <input type="text" class="layui-input" id="time" placeholder=" - " autocomplete="off">
                                </div>
                            </div>
                            <div class="layui-condition">
                                <button type="button" class="layui-btn" id="search" lay-event="search">
                                    <i class="layui-icon">&#xe615;</i>搜索
                                </button>
                            </div>
                        </div>
                    </script>

                    <script type="text/html" id="fromUserIdTpl">
                        {{d.fromUserId}}
                        {{# if(d.fromHost == 0){ }}
                            (用户)
                        {{# }else{ }}
                            (主播)
                        {{# } }}
                    </script>

                    <script type="text/html" id="toUserIdTpl">
                        {{d.toUserId}}
                        {{# if(d.toHost == 0){ }}
                            (用户)
                        {{# }else{ }}
                            (主播)
                        {{# } }}
                    </script>

                    <script type="text/html" id="lablesTpl">
                        {{# if(d.type == -1){ }}
                            未评价
                        {{# }else if(d.type == 0){ }}
                            好评
                        {{# }else if(d.type == 1){ }}
                            差评
                        {{# } }}<br>
                        {{# if(d.type != -1){ }}
                            {{# for(var lable in d.lables){ }}
                                <button class="layui-btn layui-btn-radius layui-btn-xs"
                                        style="background-color: {{ d.lables[lable].color }}">{{ d.lables[lable].name }}</button>
                            {{# } }}
                        {{# } }}
                    </script>

                    <script type="text/html" id="fileTpl">
                        {{# if(d.file.length == 0){ }}
                            处理中...
                        {{# }else{ }}
                            {{# for(var i=0,len=d.file.length; i<len; i++){ }}
                                {{# if(i > 0){ }}
                                    <br />
                                {{# } }}
                                <a href="{{ d.file[i] }}" target="_blank" style="text-decoration: none;">{{ d.file[i] }}</a>
                            {{# } }}
                        {{# } }}
                    </script>

                    <script type="text/html" id="vstatusTpl">
                        {{# if(d.vstatus == 0){ }}
                            正常
                        {{# }else{ }}
                            <span style="color: #ff0000;">已删除</span>
                        {{# } }}
                    </script>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="<%=path%>/js/operatemanage/call/list.js?v=1.1.12"></script>
</body>
</html>
